﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Data;

namespace LYWebsite.Models
{
    public class UserModel
    {
        public string userName { get;set; }

        public string carImage { get; set; }

        public string carName { get; set; }

        public string carDescription { get; set; }

        public string locationImage { get; set; }

        public string locationName { get; set; }
        public int? chargingTimes { get; set; }

        public UserModel(User user)
        {
            userName = user.UserName;
            carImage = user.Car.ImageUrl;
            carName = user.Car.CarName;
            carDescription = user.Car.Description;
            locationImage = user.Location.ImageUrl;
            locationName=user.Location.LocationName;
            chargingTimes = user.ChargingTimes;

        }
    }
}